package com.mq.rocketmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @Author: 19239
 * @Description:
 * @Date: 2024/6/27
 * @Version: 1.0
 */
@Component
@Slf4j
@RocketMQMessageListener(consumerGroup = "${rocketmq.producer.group}", topic = "book", selectorExpression = "test1"
        ,messageModel = MessageModel.BROADCASTING)
public class MessageOtherListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        log.info("MessageOtherListener receive message:{}",s);
    }
}
